/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { RecruitApply } from '../models/RecruitApply';
import type { RIPageRecruitApply } from '../models/RIPageRecruitApply';
import type { RString } from '../models/RString';

import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';

export class RecruitApplyControllerService {

    /**
     * 根据用户，来获取用户信息
     * @param current
     * @returns RIPageRecruitApply OK
     * @throws ApiError
     */
    public static selectAllByUser(
        current: number,
    ): CancelablePromise<RIPageRecruitApply> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/recruitApply/selectAllByUser',
            query: {
                'current': current,
            },
        });
    }

    /**
     * 管理员查询所有申请订单
     * @param current
     * @returns RIPageRecruitApply OK
     * @throws ApiError
     */
    public static selectAllByAdmin(
        current: number,
    ): CancelablePromise<RIPageRecruitApply> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/recruitApply/selectAllByAdmin',
            query: {
                'current': current,
            },
        });
    }

    /**
     * 添加人员需求
     * @param requestBody
     * @returns RString OK
     * @throws ApiError
     */
    public static addRecruitApply(
        requestBody: RecruitApply,
    ): CancelablePromise<RString> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/recruitApply/add',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

}
